<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=
    , initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app"></div>
</body>
<script src="https://unpkg.com/vue@next"></script>
<script>
    const app=Vue.createApp({
        template:`
        <blog-post title='hello' style='color:red'/>
        `
    })
    app.component('blog-post',{
        template:`
        <h4>0、My journey with Vue</h4>
        <h4 v-bind="$attrs.style">1、My journey with Vue</h4>
        <h4 :style="$attrs.style">2、My journey with Vue</h4>
        <h4 @click="handleClick" v-bind:title="$attrs.title">3、My journey with Vue</h4>`,
            methods: {
                handleClick(){
                    console.log('this.$attrs---'+this.$attrs.title);
                }
            },
    })
    const vm=app.mount("#app")
</script>
</html>